package gui;

import java.text.DecimalFormat;

public abstract class Debug {
	
	public static final boolean DEBUG = false;

	/*   
	public static String printArray(NeuralNetworkSet nnSet)
	{
		String output = "";
		int[][] input = nnSet.getInput();
		for (int[] i : input)
		{
			output += "\n\t\t" + printArray(i);
		}
		return output;
	}*/

	public static String printArray(int[][] array)
	{
		String output = "";
		for (int[] i : array)
		{
			output += "\n\t\t" + printArray(i);
		}
		return output;
	}
	
	public static String printArray(int[] array)
	{
		
		String output = "";
		
		DecimalFormat FourDP;
        FourDP = new DecimalFormat("#0.0000");
		
		for (int i : array)
		{
			if (i>0)
			{
				FourDP = new DecimalFormat(" #0.0000");
				output += "\t[" + FourDP.format(i) + "]";
			} else {
				FourDP = new DecimalFormat("#0.0000");
				output += "\t[" + i + "]";
			}
		}	
		return output;
	}

	public static String printArray(double[][] array) {
		String output = "";
		for (double[] i : array)
		{
			output += "\n\t\t" + printArray(i);
		}
		return output;
	}

	public static String printArray(double[] array) {
		String output = "";
		
		DecimalFormat FourDP;
        FourDP = new DecimalFormat("#0.0000");

		for (double i : array)
		{
			if (i>0)
			{
				FourDP = new DecimalFormat(" #0.0000");
				output += "\t[" + FourDP.format(i) + "]";
			} else {
				FourDP = new DecimalFormat("#0.0000");
				output += "\t[" + FourDP.format(i) + "]";
			}
		}
		
		return output;
	}
	
	
}
